//////////////////////////////////////////////////////////////////////////

#ifndef _PATIENT_H_
#define _PATIENT_H_

//////////////////////////////////////////////////////////////////////////

#ifndef _HUMAN_H_
#include "human.h"
#endif

#ifndef _RESEARCH_H_
#include "research.h"
#endif

#include <vector>
#include <QString>

//////////////////////////////////////////////////////////////////////////


/** Patient
*
*  @author  Anastasia Karpinska
*  @author  Roman Pasechnik
*  @since   Oct 17th, 2009
*  @updated Oct 18th, 2009
*/

class Patient : public Human
{
//////////////////////////////////////////////////////////////////////////

public:

//////////////////////////////////////////////////////////////////////////


    /** Constructor */
    Patient( size_t _historyNumber,
			 const QString& _surname,
             const QString& _name,
             const QString& _secondName,
             const QString& _birthDate,
			 Human::Sex _sex,
             const QString& _diagnosis,
             const QString& _notes = "" );

	Patient();


    /** Returns patient's history number */
    size_t GetHistoryNumber() const;


    /** Returns patient's diagnosis */
    const QString& GetDiagnosis() const;


    /** Returns patient's additional notes */
    const QString& GetNotes() const;


    /** Return current research */
    const Research* GetCurrentResearch() const;


    /** Sets current research to patient */
    void SetCurrentResearch (const Research* _research);


    /** Adds loaded research */
    void AddLoadedResearch (const Research& _research);


    /** Cleans all researches before loading */
    void ClearResearches ();


    /** Comparison operators */
    bool operator==( const Patient& _rhs ) const;
    bool operator!=( const Patient& _rhs ) const;


    /** [Utility type]: array of researches */
    typedef std::vector<Research> Researches;


    /** Get patient researches */
    const Researches& GetPatientResearches() const;


//////////////////////////////////////////////////////////////////////////

private:

//////////////////////////////////////////////////////////////////////////


    /** Patient history number */
    size_t m_HistoryNumber;


    /** Patient diagnosis */
    QString m_Diagnosis;


    /** Extra info about patient */
    QString m_Notes;


    /** Current research */
    const Research* m_CurrentResearch;


//////////////////////////////////////////////////////////////////////////


    /** All researches made with this patient */
    Researches m_Researches;


//////////////////////////////////////////////////////////////////////////
};

//////////////////////////////////////////////////////////////////////////

#endif

//////////////////////////////////////////////////////////////////////////
